home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qbsnip.zip / TXTLIGHT.BAS < prev    next >
BASIC Source File  |  1997-06-20  |  2KB  |  61 lines

  1. DECLARE SUB txtlight (x!, y!, delay!, txt$)
  2. 'Text light
  3. '
  4. '3/2/1997 By: - Nick Kochakian -
  5. '
  6. 'This program should look something like that thing on the top of the screen
  7. 'of the advanced ABC reader.
  8. '
  9. 'My e-mail: nickK@worldnet.att.net
  10. '
  11. 'If you decide to use this program in one of yours please give me credit!
  12. '
  13. 'Have fun! :)
  14.  
  15. CLS
  16. 'Your message should be no longer that 80 characters
  17. txt$ = " Text Light 1997 By: - Nick Kochakian  :) "
  18. x = 1: y = 1: delay = 1000: txtlight x, y, delay, txt$
  19.  
  20. SUB txtlight (x, y, delay, txt$)
  21.  
  22. 'Rear, Middle, Front
  23. y1 = y: y2 = y + 1: y3 = y + 2
  24. y4 = y + 3: y5 = y + 4: y6 = y1 - 1: y7 = y5 + 1
  25. dirs = 1: txtlen = LEN(txt$)
  26.  
  27. DO
  28.  
  29.   LOCATE x, y1: COLOR 8: PRINT MID$(txt$, y1, 1);
  30.   LOCATE x, y2: COLOR 7: PRINT MID$(txt$, y2, 1);
  31.   LOCATE x, y3: COLOR 15: PRINT MID$(txt$, y3, 1);
  32.   LOCATE x, y4: COLOR 7: PRINT MID$(txt$, y4, 1);
  33.   LOCATE x, y5: COLOR 8: PRINT MID$(txt$, y5, 1);
  34.  
  35.   IF dirs = 1 THEN
  36.     y5 = y5 + 1: y = y + 1: y4 = y4 + 1
  37.     y3 = y3 + 1: y2 = y2 + 1: y1 = y1 + 1
  38.   END IF
  39.  
  40.   IF dirs = 2 THEN
  41.     y1 = y1 - 1: y = y - 1: y5 = y5 - 1
  42.     y4 = y4 - 1: y3 = y3 - 1: y2 = y2 - 1
  43.   END IF
  44.  
  45.   IF y5 > txtlen THEN dirs = 2
  46.   IF y1 < x + 1 THEN dirs = 1
  47.  
  48.   FOR i = 1 TO delay: NEXT
  49.  
  50.   IF dirs = 1 THEN y6 = y1 - 1
  51.   IF dirs = 1 THEN IF y6 < 1 THEN y6 = y - 1 ELSE LOCATE x, y6: PRINT " "
  52.  
  53.   IF dirs = 2 THEN y7 = y5 + 1
  54.   IF dirs = 2 THEN IF y7 > 80 THEN y7 = y5 + 1 ELSE LOCATE x, y7: PRINT " "
  55.  
  56. LOOP UNTIL INKEY$ <> ""
  57.  
  58.  
  59. END SUB
  60.  
  61.